Skip to content

fix(playwright): flaky tests - #8347

Closed
pooja-bruno wants to merge 13 commits into
usebruno:mainfrom
pooja-bruno:fix/flaky-tests
Closed

pooja-bruno wants to merge 13 commits into
usebruno:mainfrom
pooja-bruno:fix/flaky-tests

Conversation

@pooja-bruno

@pooja-bruno pooja-bruno commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • Tests
    • Improved environment import assertions (Insomnia v4/v5) by using a shared helper to reliably verify flattened values in virtualized tables.
    • Expanded coverage to confirm nested and inherited environment variables (including added keys in development).
    • Prevented test interference by dismissing the file format “location” modal after toggling selection.
    • Increased navigation stability by only expanding tab overflow menus when they aren’t already expanded.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3377d5dd-4dda-4a7c-a93a-64df4f9f68ba

📥 Commits

Reviewing files that changed from the base of the PR and between 5b969f0 and 9f53c3a.

📒 Files selected for processing (1)
  • tests/utils/page/actions.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/utils/page/actions.ts

Walkthrough

This PR adds a getEnvVarValueLine test helper for reading environment variable values from virtualized table rows, refactors Insomnia v4/v5 environment import specs to use it, makes the overflow tab click conditional on aria-expanded, and closes a lingering modal in a Postman import test.

Changes

Test helper and test refactors

Layer / File(s) Summary
New getEnvVarValueLine helper and overflow tab fix
tests/utils/page/actions.ts
Adds exported getEnvVarValueLine(page, name) to locate an env-var's .CodeMirror-line within a virtualized table row, and guards the overflow tab click on aria-expanded state.
Insomnia v4 environment tests use helper
tests/import/insomnia/import-insomnia-v4-environments.spec.ts
Imports and uses getEnvVarValueLine to replace deep-key waits and manual row/.CodeMirror-line lookups with direct toHaveText assertions for Base, Staging, and Development environments.
Insomnia v5 environment tests use helper
tests/import/insomnia/import-insomnia-v5-environments.spec.ts
Imports and uses getEnvVarValueLine to replace deep-key waits and manual row/.CodeMirror-line lookups with direct toHaveText assertions for Base, Staging, and Development environments.
Postman import modal dismissal fix
tests/import/postman/import-file-format-options.spec.ts
Adds a step pressing Escape and asserting the location modal becomes hidden to prevent it leaking into later tests.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • usebruno/bruno#6848: Also changes shared Playwright page-action helpers in tests/utils/page/actions.ts, including overflow-tab and environment-row handling.

Suggested reviewers: bijin-bruno, lohit-bruno, naman-bruno

Poem

A tiny helper found its way,
Through virtual rows and tests today.
One modal closed, one tab behaved,
And env vars were cleanly saved. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the changes, but it is too generic to identify the main flaky-test fixes. Use a more specific title like “fix(playwright): stabilize insomnia import and postman modal tests”.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pooja-bruno
pooja-bruno marked this pull request as ready for review July 3, 2026 13:09
@pooja-bruno
pooja-bruno deleted the fix/flaky-tests branch September 23, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants